//
// CPatchRdrPass.java
// Copyright (C) 2010  "Naush" <naush _ hotmail _ fr>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>./* ----------------------------------------------------------------------------







package org.ryzom.nel.threed;

import org.ryzom.nel.misc.CRefCount;

public class CPatchRdrPass extends CRefCount {
  private long swigCPtr;

  public CPatchRdrPass(long cPtr, boolean cMemoryOwn) {
    super(nel3dJNI.CPatchRdrPass_SWIGUpcast(cPtr), cMemoryOwn);
    swigCPtr = cPtr;
  }

  public static long getCPtr(CPatchRdrPass obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        nel3dJNI.delete_CPatchRdrPass(swigCPtr);
      }
      swigCPtr = 0;
    }
    super.delete();
  }

  public void setRefCount(int value) {
    nel3dJNI.CPatchRdrPass_RefCount_set(swigCPtr, this, value);
  }

  public int getRefCount() {
    return nel3dJNI.CPatchRdrPass_RefCount_get(swigCPtr, this);
  }

  public void setTextureDiffuse(SWIGTYPE_p_NLMISC__CSmartPtrT_NL3D__ITexture_t value) {
    nel3dJNI.CPatchRdrPass_TextureDiffuse_set(swigCPtr, this, SWIGTYPE_p_NLMISC__CSmartPtrT_NL3D__ITexture_t.getCPtr(value));
  }

  public SWIGTYPE_p_NLMISC__CSmartPtrT_NL3D__ITexture_t getTextureDiffuse() {
    long cPtr = nel3dJNI.CPatchRdrPass_TextureDiffuse_get(swigCPtr, this);
    return (cPtr == 0) ? null : new SWIGTYPE_p_NLMISC__CSmartPtrT_NL3D__ITexture_t(cPtr, false);
  }

  public void setTextureAlpha(SWIGTYPE_p_NLMISC__CSmartPtrT_NL3D__ITexture_t value) {
    nel3dJNI.CPatchRdrPass_TextureAlpha_set(swigCPtr, this, SWIGTYPE_p_NLMISC__CSmartPtrT_NL3D__ITexture_t.getCPtr(value));
  }

  public SWIGTYPE_p_NLMISC__CSmartPtrT_NL3D__ITexture_t getTextureAlpha() {
    long cPtr = nel3dJNI.CPatchRdrPass_TextureAlpha_get(swigCPtr, this);
    return (cPtr == 0) ? null : new SWIGTYPE_p_NLMISC__CSmartPtrT_NL3D__ITexture_t(cPtr, false);
  }

  public void clearAllRenderList() {
    nel3dJNI.CPatchRdrPass_clearAllRenderList(swigCPtr, this);
  }

  public void appendRdrPatchFar0(CPatch rdrPatch) {
    nel3dJNI.CPatchRdrPass_appendRdrPatchFar0(swigCPtr, this, CPatch.getCPtr(rdrPatch), rdrPatch);
  }

  public void appendRdrPatchFar1(CPatch rdrPatch) {
    nel3dJNI.CPatchRdrPass_appendRdrPatchFar1(swigCPtr, this, CPatch.getCPtr(rdrPatch), rdrPatch);
  }

  public void appendRdrPatchTile(long pass, CRdrTileId rdrTile, long maxRenderedFaces) {
    nel3dJNI.CPatchRdrPass_appendRdrPatchTile(swigCPtr, this, pass, CRdrTileId.getCPtr(rdrTile), rdrTile, maxRenderedFaces);
  }

  public CPatch getRdrPatchFar0() {
    long cPtr = nel3dJNI.CPatchRdrPass_getRdrPatchFar0(swigCPtr, this);
    return (cPtr == 0) ? null : new CPatch(cPtr, false);
  }

  public CPatch getRdrPatchFar1() {
    long cPtr = nel3dJNI.CPatchRdrPass_getRdrPatchFar1(swigCPtr, this);
    return (cPtr == 0) ? null : new CPatch(cPtr, false);
  }

  public CRdrTileId getRdrTileRoot(long pass) {
    long cPtr = nel3dJNI.CPatchRdrPass_getRdrTileRoot(swigCPtr, this, pass);
    return (cPtr == 0) ? null : new CRdrTileId(cPtr, false);
  }

  public long getMaxRenderedFaces() {
    return nel3dJNI.CPatchRdrPass_getMaxRenderedFaces(swigCPtr, this);
  }

  public CPatchRdrPass() {
    this(nel3dJNI.new_CPatchRdrPass(), true);
  }

  public boolean lt(CPatchRdrPass o) {
    return nel3dJNI.CPatchRdrPass_lt(swigCPtr, this, CPatchRdrPass.getCPtr(o), o);
  }

}
